package com.taobao.txc.common.config;

import com.taobao.diamond.client.impl.DiamondEnv;
import com.taobao.txc.common.LoggerInit;
import com.taobao.txc.common.LoggerWrap;
import com.taobao.txc.common.b.b;
import com.taobao.txc.common.b.c;

public class f
  extends i
{
  private static final LoggerWrap k = LoggerInit.logger;
  
  public f()
  {
    String str1 = System.getProperty("diamond.center.server.ip");
    String str2 = System.getProperty("diamond.center.server.port");
    int i = a(8000);
    if (str2 != null) {
      try
      {
        i = a(Integer.parseInt(str2));
      }
      catch (NumberFormatException localNumberFormatException)
      {
        k.warn(String.format("serverPort invalid:%s use default:%d", new Object[] { str2, Integer.valueOf(8000) }));
      }
    }
    if ((str1 == null) || (str1.isEmpty()))
    {
      k.info(String.format("try diamond center %s port:%d", new Object[] { "100.100.17.97", Integer.valueOf(i) }));
      this.a = h.a(i, new String[] { "100.100.17.97" });
    }
    else
    {
      k.info(String.format("try diamond center %s port:%d", new Object[] { str1, Integer.valueOf(i) }));
      str1 = a(str1);
      this.a = h.a(i, new String[] { str1 });
    }
    try
    {
      String str3 = this.a.getConfig("com.taobao.txc.rules.global", "TXC_GROUP", 5000L);
      if (str3 == null) {
        throw new c(b.r);
      }
    }
    catch (Throwable localThrowable)
    {
      k.warn("Init failed on center diamond");
      throw new c(b.r);
    }
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.common.config.f
 * JD-Core Version:    0.7.0.1
 */